<?php 

if ((isset($_GET['id'])) && ($_GET['id'] != "")) {
  $deleteSQL = sprintf("DELETE FROM bannerplug_data WHERE id=%s",
                       GetSQLValueString($_GET['id'], "int"));

mysql_select_db($database_konek, $konek);
$query_plugtext = "SELECT * FROM bannerplug_data WHERE id = '$_GET[id]' ORDER BY id ASC";
$plugtext = mysql_query($query_plugtext, $konek) or die(mysql_error());
$row_plugtext = mysql_fetch_assoc($plugtext);
$totalRows_plugtext = mysql_num_rows($plugtext);

if(file_exists('../g-konten/fm/slide/'.$_GET['idmod'].'/'.$row_plugtext['image']))
unlink('../g-konten/fm/slide/'.$_GET['idmod'].'/'.$row_plugtext['image']);

  mysql_select_db($database_konek, $konek);
  $Result1 = mysql_query($deleteSQL, $konek) or die(mysql_error());

  ?>
	
	 <script language="javascript">
  	<!--
     	    alert('Delete Success')
			window.location = "home.php?page=pluginview&p=<?php echo $_GET['p'] ?>&root=data_module.php&idmod=<?php echo $_GET['idmod'] ?>";
			
   	--></script>
	<?php
}
?>
